package com.ybg.activiti.modeler;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import javax.servlet.ServletOutputStream;
import javax.servlet.WriteListener;

/*** @author https://gitee.com/YYDeament/88ybg
 * 
 * 
 * 
 * @date 2016/10/1 */
public class FilterServletOutputStream extends ServletOutputStream {
	
	private DataOutputStream	stream;
	private WriteListener		writeListener;
	
	public FilterServletOutputStream(OutputStream output) {
		stream = new DataOutputStream(output);
	}
	
	@Override
	public void write(int b) throws IOException {
		stream.write(b);
	}
	
	@Override
	public void write(byte[] b) throws IOException {
		stream.write(b);
	}
	
	@Override
	public void write(byte[] b, int off, int len) throws IOException {
		stream.write(b, off, len);
	}
	
	@Override
	public void setWriteListener(WriteListener writeListener) {
		this.writeListener = writeListener;
	}
	
	@Override
	public boolean isReady() {
		return true;
	}
}